'use client';

import './globals.css';
import { AuthProvider } from '@/contexts/AuthContext';
import { ConfigProvider } from '@arco-design/web-react';
import zhCN from '@arco-design/web-react/es/locale/zh-CN';
import Header from '@/components/layout/Header';

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="zh-CN">
      <body>
        <ConfigProvider locale={zhCN}>
          <AuthProvider>
            <div className="min-h-screen flex flex-col">
              <Header />
              <main className="flex-1 container mx-auto p-4">
                {children}
              </main>
              <footer className="bg-gray-100 py-4 text-center text-gray-600">
                <div className="container mx-auto">
                  酒店管理系统 &copy; {new Date().getFullYear()}
                </div>
              </footer>
            </div>
          </AuthProvider>
        </ConfigProvider>
      </body>
    </html>
  );
}
